package kr.couponplay.android.activity.message;

import android.app.AlertDialog;
import android.content.Context;
import android.text.Html;
import android.view.View;
import android.view.View.OnClickListener;

public class MessageOnClickListener implements OnClickListener {
	private Context context;
	private MessageListViewAdapter purchaseListAdapter;
	private int position;
	
	public MessageOnClickListener(Context context, MessageListViewAdapter purchaseListAdapter, int position) {
		this.context = context;
		this.position = position;
		this.purchaseListAdapter = purchaseListAdapter;
	}

	@Override
	public void onClick(View v) {
        String message = "[" + purchaseListAdapter.getItem(position).getMessage() + "]<br/>";
        new AlertDialog.Builder(context)
            .setMessage(Html.fromHtml(message))
            .setNegativeButton("확인", null)
            .show();
	}
}
